home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Communications
/
Network
/
Send File Script Folder
/
Send File Script (text)
< prev
Wrap
Text File
|
1994-05-24
|
2KB
|
55 lines
-- This script is very useful with Eudora 1.4 (I use 1.4.2)
-- It allows one to select a file on a disk that will be automagically attached
-- to an autoreply to messages whose "Subject:" field matches some user-specified
-- string.
-- I wrote this script to learn more about how to script Eudora, and I hope it will
-- help other people too. Of course, feel free to modify the script to suit your needs,
-- just don't distribute the modified scripts along with this package.
-- Please distribute this package (compiled script, text source, readme) to anybody
-- who wants it, Just drop me a line (e-mail) if you like it!
-- Just my little contribution to the 'net community...
property fileToSend : ""
property subjToMatch : ""
if fileToSend is "" then
set fileToSend to choose file with prompt ¬
"Select a file to attach please..."
else
set dlg to display dialog "File to attach:" default answer (¬
fileToSend as string) ¬
buttons {"Select...", "Cancel", "OK"} ¬
default button "OK"
set fileToSend to text returned of dlg
if button returned of dlg is "Select..." then
set fileToSend to choose file with prompt ¬
"Select a file to attach please..."
end if
end if
display dialog "Subject to match:" default answer subjToMatch
set subjToMatch to text returned of result
tell application "Eudora1.4.2"
set i to count message in mailbox "In" of mail folder ""
set curMsg to 1
set trashMsg to count message in mailbox "Trash" of mail folder ""
repeat i times
if field "Subject:" of message curMsg of mailbox "In" of mail folder "" ¬
contains subjToMatch then
move (message curMsg of mailbox "In" of mail folder "") ¬
inserthere end of mailbox "Trash" of mail folder ""
set trashMsg to trashMsg + 1
set theReply to reply (message trashMsg of mailbox "Trash" ¬
of mail folder "")
attach theReply documentlist fileToSend
with timeout of 600 seconds
queue theReply queuetype 1
end timeout
else
set curMsg to curMsg + 1
end if
end repeat
-- Don't forget to connect to send the queued messages
end tell